package com.sibu.yx.promotion.common.util;

import java.net.InetAddress;
import java.net.UnknownHostException;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class IPUtil {
	//获取本机IP
	@SuppressWarnings("static-access")
	public static String getLocalIP() {
		InetAddress ia=null;
		try {
			ia=ia.getLocalHost();
		} catch (UnknownHostException e) {
			log.error("[{}]", e);
		}
		return ia.getHostAddress();
	}
}
